package itheima.ZuoYe02;

public class Demo {
    public static void main(String[] args) {
        Student s1 = new Student();
        Student s2 = new Student();
        try {
            s1.setAge(99);
        }catch (AgeException e) {
            System.out.println("年龄输入有误!");
        }
        try {
            s2.setSex("无");
        }catch (SexException e){
            System.out.println("性别输入有误!");
        }
    }
}
